package com.app.oasystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @author 86+
 * @data 2021-04-13
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Email implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String title;

    private String content;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createtime;

    /**
     * 外键，指向用户表
     */
    @TableField("fromId")
    private Integer fromId;

    /**
     * 附件的链接URL
     */
    private String attachment;

    /**
     * 外键，指向用户表
     */
    @TableField("toId")
    private Integer toId;

    /**
     * 0未读1已读
     */
    @TableField("isRead")
    private Integer isRead;

    /**
     * 0正式邮件1垃圾邮件
     */
    @TableField("isDel")
    private Integer isDel;

    /**
     * 表示该属性不为数据库表字段，但又是必须使用的。
     */
    @TableField(exist = false)
    private String username;


}
